home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / netinfo / nibind_prot.x < prev   
Text File  |  1991-06-17  |  2KB  |  95 lines

  1. /* 
  2.  * NetInfo binder protocol specification
  3.  * Copyright (C) 1989 by NeXT, Inc.
  4.  */
  5.  
  6. /* Preamble appearing on all generated output */
  7. #ifndef NOPREAMBLE
  8. %/*
  9. % * Output of the RPC protocol compiler: DO NOT EDIT
  10. % * Copyright (C) 1989 by NeXT, Inc.
  11. % */
  12. #endif
  13.  
  14. #ifdef RPC_HDR
  15. %#ifndef NI_PROG
  16. %#include <netinfo/ni_prot.h>
  17. %#endif
  18. #else
  19. %#include <stdio.h>
  20. %#include "clib.h"
  21. #endif
  22.  
  23. const NIBIND_MAXREGS = 32;
  24.  
  25. struct nibind_addrinfo {
  26.     unsigned udp_port;
  27.     unsigned tcp_port;
  28. };
  29.  
  30. struct nibind_registration {
  31.     ni_name tag;
  32.     nibind_addrinfo addrs;
  33. };
  34.  
  35. union nibind_getregister_res switch (ni_status status) {
  36. case NI_OK:
  37.     nibind_addrinfo addrs;
  38. default:
  39.     void;
  40. };
  41.  
  42. union nibind_listreg_res switch (ni_status status) {
  43. case NI_OK:
  44.     nibind_registration regs<NIBIND_MAXREGS>;
  45. default:
  46.     void;
  47. };
  48.  
  49. struct nibind_clone_args {
  50.     ni_name tag;
  51.     ni_name master_name;
  52.     unsigned master_addr;
  53.     ni_name master_tag;
  54. };
  55.     
  56. struct nibind_bind_args {
  57.     unsigned client_addr;
  58.     ni_name client_tag;
  59.     ni_name server_tag;
  60. };
  61.  
  62. program NIBIND_PROG {
  63.     version NIBIND_VERS {
  64.         void
  65.         NIBIND_PING(void) = 0;
  66.  
  67.         ni_status
  68.         NIBIND_REGISTER(nibind_registration) = 1;
  69.  
  70.         ni_status
  71.         NIBIND_UNREGISTER(ni_name) = 2;
  72.  
  73.         nibind_getregister_res
  74.         NIBIND_GETREGISTER(ni_name) = 3;
  75.  
  76.         nibind_listreg_res
  77.         NIBIND_LISTREG(void) = 4;
  78.  
  79.         ni_status
  80.         NIBIND_CREATEMASTER(ni_name) = 5;
  81.  
  82.         ni_status
  83.         NIBIND_CREATECLONE(nibind_clone_args) = 6;
  84.  
  85.         ni_status
  86.         NIBIND_DESTROYDOMAIN(ni_name) = 7;
  87.  
  88.         /*
  89.          * Answers only if the given binding is served
  90.          */
  91.         void
  92.         NIBIND_BIND(nibind_bind_args) = 8;
  93.     } = 1;
  94. } = 200100001;
  95.